<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Account extends Model
{
    //
    protected $table = 'accounts';
    const TYPE_CHARGE = 1;
    const TYPE_COST = 2;
    protected $fillable = [
        'amount',
        'type',
        'user_id',
        'note'
    ];
    public function user(){
        return $this->belongsTo(User::class,'user_id','id');
    }
}
